package javacafe.action.freeboard;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.member.LoginInfoDTO;


public class AddFreeBbsFormAction implements Action {
	
	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward actfoward = new ActionForward();		
		
		LoginInfoDTO ldto = new LoginInfoDTO();		

		if (request.getSession().getAttribute("loginInfo") == null) {
			actfoward.setUrl("index");
		
		}else{			
			ldto = (LoginInfoDTO)request.getSession().getAttribute("loginInfo");
			request.setAttribute("dto",ldto);
			actfoward.setUrl("addfreebbsform");
		}
		
		return actfoward;
	}
}
